
import axios from "@/request/request";
import qs from 'qs'
// 热门推荐的接口
export const getCommend = () => axios.get('/products/recommend');
// 热门推荐的接口
export const getHot = () => axios.get('/products/hot');
// 发送验证码
export const sendSMS = (params) => axios.post('/sendSMS', qs.stringify(params));
// 手机号登录
export const phoneRegin = (params) => axios.post('/phoneRegin', qs.stringify(params));
// 微信扫码
export const WxLogin = (params) => axios.post('/wechatUsers/PCLogin', qs.stringify(params));
// 微信绑定手机号
export const wxBindPhone = (params) => axios.post('/wechatUsers/binding', qs.stringify(params));
// 获取用户信息
export const userInfoAPI = () => axios.get('/shop/userProfiles');
// 获取商品详情页
export const goodsDetail = (id) => axios.get(`/products/${id}`);
// 搜索全部商品
export const goodsSearch = (params) => axios.get('/products', { params });
// 加入购物车
export const joinCart = (params) => axios.post('/shop/carts/add', qs.stringify(params));
// 查看购物车
export const cartShopList = () => axios.get('/shop/carts');
// 删除购物车
export const delGoods = (id) => axios.delete(`/shop/carts?productIds=${id}`)
